// @ts-ignore
/* eslint-disable */
import { get, post } from '@/services/request';
import { InsureData, SubjectData } from './data';

/** 保险统计 */
export async function queryInsureData(data: { year: Number; areaId: string }) {
  return post<InsureData>('/hemutechApi/data/queryInsureData', data);
}

/** 养殖统计 */
export async function querySubjectData(data: { year: Number; areaId: string }) {
  return post<SubjectData>('/hemutechApi/data/querySubjectData', data);
}

/** 地图数据 */
export async function fetchMapData(mapUrl: string) {
  // return fetch(
  //   'https://geo.datav.aliyun.com/areas_v3/bound/' + adCode + '_full.json',
  // );
  // https://geo.datav.aliyun.com/areas_v3/bound/140000_full.json
  return fetch(mapUrl);
}
